<?php
include("./include/config.inc.php");
include("./class.php");
$q = strtolower($_GET["q"]);
if (!$q) return;
$table = "state";
$rows  = "DISTINCT stateName,stateId";
$where = "stateName REGEXP '^$q'";
$callOfClass = new database();
$rsd = $callOfClass->selectQuery($table,$rows,$where);
while($stateRow = mysql_fetch_array($rsd)) 
{
	echo $stateRow['stateName'].'|'.$stateRow['stateId'].'|'.$stateRow['stateName']."\n";
}
?>